package de.loopmode.display
{ 
        import flash.display.Graphics;
        
        import mx.core.UIComponent; 

        public class RectangleShape extends UIComponent 
        { 
            public function RectangleShape() 
            { 
                    super(); 
            } 
            
            public var borderColor:Number = 0x000000;
            public var borderAlpha:Number = 0;
            public var borderThickness:Number = 0;
            
            public var fillColor:Number = 0x999999;
            public var fillAlpha:Number = 1;
            
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void 
            { 
                    var g:Graphics = this.graphics; 
                    
                    g.clear();
                    if (borderThickness>0 && borderAlpha > 0) {
                    	g.lineStyle(borderThickness,borderColor,borderAlpha);
                    }
                    g.beginFill(fillColor, fillAlpha); 
                    g.moveTo(0,0); 
                    g.lineTo(unscaledWidth,0); 
                    g.lineTo(unscaledWidth,unscaledHeight); 
                    g.lineTo(0,unscaledHeight); 
                    g.lineTo(0,0); 
            } 
        } 
}